<!DOCTYPE html>
<html lang="en-US">
<!--********************************************-->
<!--*       Generated from PreTeXt source      *-->
<!--*                                          *-->
<!--*         https://pretextbook.org          *-->
<!--*                                          *-->
<!--********************************************-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
</head>
<body class="ignore-math">
<h3 class="heading"><span class="type">Paragraph</span></h3>
<p><dfn class="terminology">Example 4</dfn> For a non-homogeneous BVP, consider</p>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation}
y^{\prime \prime}+ 4y=\cos x,\quad y'(0)=0,\quad y'(\pi)=0.\tag{7.1.3}
\end{equation}
</div>
<p class="continuation">The general solution of the corresponding homogeneous DEs to <a href="" class="xref" data-knowl="./knowl/BVP.html" title="Equation 7.1.3">(7.1.3)</a> is</p>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
Y_H(x)=c_1\cos 2x+c_2\sin 2x.
\end{equation*}
</div>
<p class="continuation">Assume a particular solution to <a href="" class="xref" data-knowl="./knowl/BVP.html" title="Equation 7.1.3">(7.1.3)</a> has the form</p>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
Y_P=A\cos x+B\sin x.
\end{equation*}
</div>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
(-A\cos x-B\sin x) +4(A\cos x+B\sin x)=\cos x,\quad \to\quad A=1/3,~~B=0.
\end{equation*}
</div>
<p class="continuation">Then the general solution to <a href="" class="xref" data-knowl="./knowl/BVP.html" title="Equation 7.1.3">(7.1.3)</a> is</p>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
y=Y_H+Y_P=c_1\cos 2x+c_2\sin 2x+1/3\cos x.
\end{equation*}
</div>
<p class="continuation">Set in B.C.’s:</p>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
y'(x)=-2c_1\sin 2x +2c_2\cos 2x -1/3\sin x
\end{equation*}
</div>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
y'(0)=0~ \Rightarrow~ c_2=0, \quad y'(\pi)=0 ~\Rightarrow ~c_2=0.
\end{equation*}
</div>
<p class="continuation">Then the solution is</p>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/BVP.html ./knowl/BVP.html ./knowl/BVP.html">
\begin{equation*}
y(x)=c_1\cos 2x +1/3\cos x, \quad c\in\mathbb{R}.
\end{equation*}
</div>
<span class="incontext"><a href="sec7_1.html#p-310" class="internal">in-context</a></span>
</body>
</html>
